Calculate speed
Write a program that takes the distance and the time to print speed in the output
Speed = to move / time
Write a program that takes the distance and the time to print speed in the output
Speed = to move / time
let msg = 'error' | |
alert(msg) |
This answer is only visible to premium members
let msg = 'error' | |
alert(msg) |
This answer is only visible to premium members
let msg = 'error' | |
alert(msg) |
This answer is only visible to premium members
x = int(input('lotfan masafat ra be metr vared konid')) # Distance traveled to meter | |
y = int(input('lotfan zaman ra be sanie vared konid')) # Distance traveled to seconds | |
s = (x/y) # Formula Calculate speed | |
print (s) |
def ss(): | |
while True: | |
jabejaee = int(input("entre your number jabejaee:")) | |
if jabejaee <= 0: | |
break | |
s = int(input("entre your number s:")) | |
if s <= 0: | |
break | |
sorat = jabejaee / s # The speed is equal to the displacement divided by time | |
print(f"sorat: {sorat}") | |
ss() |
I got the same number for this.
a=float(input("enter the masafat:")) | |
b=float(input("enter the sorat:")) | |
result=a/b | |
print(result) |
def calculate_speed(distance, time): | |
if time == 0: | |
return "time not ziro" | |
speed=distance / time | |
return f'speed:{speed} km/h' | |
distance= float(input("distance(km): ")) | |
time=float(input("time(h): ")) | |
print(calculate_speed(distance,time)) |
distance = float(input("Please enter distance (km): ")) | |
time = float(input("Please enter time (hour): ")) | |
if time != 0: | |
speed = distance / time | |
print(f"speed = {speed:.1f} km/h") |
i = float(input("taym (saat): ")) | |
y = float(input('masafat tey shode (kelometr): ')) | |
print(y/i,': kelomet bar saat sorat') |
def harekat(): | |
masafat = int(input("please enter masafate tey shodeh(m): ")) | |
zaman = int(input("please enter moddate zaman(s): ")) | |
print("sor at = ", masafat / zaman , "m/s") | |
harekat() |
Submitting answers is currently unavailable.
Write a function that receives a string (String) as input and reversed it for example Reverse ('amir') # rimareoverse ('Hello') # Olleh
Write a program that receives an email address and separates the various sections as follows and prints on the output example: email: info@amirhn.ir info amirhn.ir Example: email: username@gmail.com username gmail.com
Write a function that receives a list of numbers and generates 2 lists for pair and individual numbers and prints in the output example ([1,2,3,4]) Output: [1,3] [2,4] [2,4]
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.